﻿using System;
using System.Web.UI;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Marbles.Core.Web.Widgets
{
    public class WidgetBase : Page
    {

        protected override void OnLoad(EventArgs e)
        {
            AddStyleAttributes();
            base.OnLoad(e);
        }

        protected virtual void AddStyleAttributes()
        {
            StringBuilder sb = new StringBuilder();
            LiteralControl lt = new LiteralControl();
            sb.AppendLine("<style type=\"text/css\">");
            sb.Append("html {");
            sb.Append("overflow:hidden;");
            sb.AppendLine("}");
            sb.Append("body {");
            sb.Append("margin:0px;");
            sb.Append("overflow:hidden;");
            sb.AppendLine("}");
            sb.AppendLine("</style>");
            lt.Text = sb.ToString();
            Header.Controls.Add(lt);
        }
    }
}

